import Vue from 'vue'
import Router from 'vue-router'
import System from "../components/System";
import Home from "../components/Home";
import Authorization from "../components/system/authorization/Authorization";
import ProductList from "../components/system/product/ProductList";
import ProductDetail from "../components/main/product/ProductDetail";

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', name: 'home', redirect: '/home'},
    {path: '/home', name: 'home', component: Home},
    {path: '/product/:id', name: 'product_detail',props:true, component: ProductDetail},
    {
      path: '/system', name: 'system', component: System,
      children: [
        {path: 'authorization/authorization', name: 'authorization', component: Authorization},
        {path: 'product/list', alias: '', name: 'product_list', component: ProductList}
      ]
    }
  ]
})
